package com.pubinfo.passbook.common.service.aviator.impl;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.pubinfo.passbook.common.entity.TRabbitmqPerson;
import org.dom4j.DocumentException;

import java.io.IOException;

public class xmltest {
  public static void main(String[] args) throws IOException, DocumentException {
  
  }
  
  private void test1() {
    String s = "{\"context\":{\"acct\":\"W0238821\",\"acctId\":11224467,\"acctType\":\"2\",\"createDate\":\"2019-01-23 00:00:00\",\"createUser\":1004040,\"disableDate\":\"2099-01-01 00:00:00\",\"enableDate\":\"2019-01-01 00:00:00\",\"hrPost\":[],\"hrRole\":[{\"acctId\":11224467,\"roleId\":109,\"roleName\":\"社区经理\"}],\"password\":\"0DB7DBB1F7EAF44CF5C077C9BC699A35\",\"salt\":\"1314\",\"source\":\"1\",\"statusCd\":\"1000\",\"statusDate\":\"2019-01-23 00:00:00\",\"tbAcctCrossRel\":[{\"crossTran\":\"Y33082507297\",\"relaType\":\"100100102\"}],\"tbAcctOrgRel\":[{\"orgId\":1,\"orgName\":\"浙江分公司\",\"relType\":\"99\"},{\"orgId\":1,\"orgName\":\"浙江分公司\",\"relType\":\"99\",\"sort\":10}],\"tbCert\":[{\"certName\":\"郑丽倩\",\"certNo\":\"330825199508032141\",\"certType\":\"1\",\"isReal\":\"1\",\"source\":\"PMS\"}],\"tbContact\":[{\"contactType\":\"1\",\"content\":\"18957001606\",\"firstFlag\":1},{\"contactType\":\"2\",\"content\":\"18957001606@189.cn\",\"firstFlag\":1}],\"tbEdu\":[],\"tbFamily\":[],\"tbHrInfoExt\":[],\"tbPerRLOrgRel\":[{\"fullOrgId\":\"/10000001/1/12/2224/10000309\",\"fullOrgName\":\"/中国电信股份有限公司浙江分公司/浙江分公司/衢州分公司/衢州龙游分公司/龙游人员虚拟部门\",\"property\":\"10000\"}],\"tbPersonnel\":{\"gender\":\"2\",\"ncCode\":\"W0238821@ZJ\",\"notes\":\"330825199508032141\",\"personnelId\":2213285,\"psnCode\":\"W0238821\",\"psnName\":\"郑丽倩\",\"psnNbr\":\"W0238821\",\"uuid\":\"7FF6A28A9E2EA96BE0532EF86086D4E3\"},\"tbPsnjob\":[],\"tbRelaCdVo\":[{\"businessSystemId\":\"80\"},{\"businessSystemId\":\"60\"}],\"tbSourceVo\":{\"source\":\"0\"},\"updateDate\":\"2020-05-20 00:00:00\",\"updateUser\":20200520,\"userHostType\":\"2\"},\"handle\":\"update\",\"serial\":\"2021110515e251a7620047dcb786420d92b00780\",\"type\":\"person\"}";
    
    JSONObject json = JSON.parseObject(s);
    TRabbitmqPerson person = JSONObject.toJavaObject(json, TRabbitmqPerson.class);
    System.out.println(person);
  }
}
